package com.wxm.killing.mq.controller;

import com.wxm.killing.mq.common.auth.UserInfo;
import com.wxm.killing.mq.common.auth.UserUtil;
import com.wxm.killing.mq.common.model.JsonResult;
import com.wxm.killing.mq.dao.TbContractRushStatusDao;
import com.wxm.killing.mq.entity.TbContractRushStatus;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description TODO
 * @author: wxm
 * @date: 2019/11/6 17:09
 * @version: 1.0
 */
@RestController
@RequestMapping(value = "/contractRushStatus")
public class TbContractRushStatusController {
    private final static Logger logger = LoggerFactory.getLogger(RushBuyController.class);

    @Autowired
    private TbContractRushStatusDao tbContractRushStatusDao;

    @GetMapping(value = "get/{id}")
    public JsonResult get(@PathVariable String id){
        JsonResult jsonResult = new JsonResult();
        Long startTime = System.currentTimeMillis();
        logger.info("TbContractRushStatusController.get start");
        TbContractRushStatus tbContractRushStatus = tbContractRushStatusDao.selectByPrimaryKey(id);
        jsonResult.setData(tbContractRushStatus);
        Long endTime = System.currentTimeMillis();
        Long useTime = endTime - startTime;
        logger.info("TbContractRushStatusController.get end 耗时："+useTime);
        return jsonResult;
    }
}
